package org;

import java.util.Iterator;
import java.util.List;

import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import org.hibernate.criterion.Restrictions;

import vo.Custom;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class Checklist {

	/**
	 * @param args
	 */
	public static void main(String[] args){
		Session session=null;
		Transaction tx=null;
		session=HibernateSessionFactory.getSession();
		tx=session.beginTransaction();
		String hql="from Custom";
		    Query query=session.createQuery(hql);
		    List<Custom> list=query.list();
		    Iterator<Custom> its=list.iterator();
		while(its.hasNext()){Custom custom=(Custom)its.next();
		System.out.println(custom.getCustomid()+""+custom.getCustomname()+""+custom.getPassword()+"\n");}}}
	
	
	
	